
// /课程接口
import request from '@/static/uitls/request.js'

//编辑课程信息
const editCourseInfo = (data) => {
	return request({
		url: '/teacher/v1/course/edit',
		method: 'POST',
		data
	})
}

//添加课程信息
const addCourseInfo = (data) => {
	return request({
		url: '/teacher/v1/course/create',
		method: 'POST',
		data
	})
}

//课程详情
const getTeacherCourseRead = (id) => {
	return request({
		url: '/teacher/v1/course/read?course_id='+id,
		method: 'GET'
	})
}


//课程全部进度
const getTeacherCourseDegree = (id) => {
	return request({
		url: '/teacher/v1/course/degree?course_order_id='+id,
		method: 'GET'
	})
}

// 课程完成进度
const getTeacherCourseFinish = (id) => {
	return request({
		url: '/teacher/v1/course/finish?course_order_id='+id,
		method: 'GET'
	})
}
module.exports = {
	editCourseInfo,
	addCourseInfo,
	getTeacherCourseRead,
	getTeacherCourseDegree,
	getTeacherCourseFinish
}